package io.gitee.zhucan123.core.infrastructure.exception;


/**
 * @author: zhuCan
 * @date: 2019-07-18 11:53
 * @description: 实体类重复异常
 */
public class EntityExistsException  extends javax.persistence.EntityExistsException {
  /**
   * 通过ID
   * @param id
   */
  public EntityExistsException(Long id) {
    super(String.format("Entity exists with id: %d", id));
  }

  /**
   * 通过编号
   * @param code
   */
  public EntityExistsException(Integer code) {
    super(String.format("Entity exists with code: %d", code));
  }


  public EntityExistsException(String msg) {
    super(String.format("%s", msg));
  }
}
